from alg import MaxNum
import generator

class Test:
    def __init__(self , times):
        self.times = times
        self.nums = []   #数据串
        self.maxNum = []  #最大数
        self.Times = []  #组成最大数所用时间
        #初始化 数组序列
        for i in range(self.times):
            self.nums.append(generator.gen_Nums(8))
        for i in range(self.times):
            alg_max = MaxNum(self.nums[i])
            temp = alg_max.getMaxNum()
            self.maxNum.append(temp[0])
            self.Times.append(temp[1])


    def output(self):
        for i in range(self.times):
            print("数组序列为:{0} , 其可组成的最大的数为{1} , 所用时间为{2}".format(self.nums[i] , self.maxNum[i] , self.Times[i]))

if __name__ == "__main__":
    print("开始测试！！！")
    test0 = Test(5)
    test0.output()

